<%@ Page Language="C#" EnableEventValidation="false" MasterPageFile="~/AnadoluBazaarGiris.Master" AutoEventWireup="true" CodeBehind="UrunDetay5.aspx.cs" Inherits="OnlineAnadolu.UrunDetay5" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" BackColor="White"
        BorderColor="#999999" BorderStyle="None" BorderWidth="1px" Caption="Urun Detay"
        CellPadding="3" DataSourceID="SqlDataSource1" GridLines="Vertical" Height="50px" Width="412px">
        <Fields>
            <asp:BoundField DataField="user_name" HeaderText="Kullanici Adi" SortExpression="user_name">
                <ItemStyle HorizontalAlign="Left" />
                <HeaderStyle HorizontalAlign="Left" />
            </asp:BoundField>
            <asp:BoundField DataField="name" HeaderText="Urun Adi" SortExpression="name">
                <ItemStyle HorizontalAlign="Left" />
                <HeaderStyle HorizontalAlign="Left" />
            </asp:BoundField>
            <asp:BoundField DataField="description" HeaderText="Tanim" SortExpression="description">
                <ItemStyle HorizontalAlign="Left" />
                <HeaderStyle HorizontalAlign="Left" />
            </asp:BoundField>
            <asp:BoundField DataField="price" HeaderText="Fiyat" SortExpression="price">
                <ItemStyle HorizontalAlign="Left" />
                <HeaderStyle HorizontalAlign="Left" />
            </asp:BoundField>
            <asp:CommandField CancelText="Iptal" EditText="Duzenle" ShowEditButton="True" UpdateText="Guncelle" />
        </Fields>
        <FooterTemplate>
            <asp:Image ID="Image1" runat="server" Height="400px" ImageUrl='<%# Eval("productimage") %>'
                Width="400px" />
        </FooterTemplate>
        <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
        <EditRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
        <RowStyle BackColor="#EEEEEE" ForeColor="Black" />
        <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
        <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
        <AlternatingRowStyle BackColor="Gainsboro" />
    </asp:DetailsView>
    <br />
    <asp:Label ID="Label1" runat="server" Text="Son Tarih"></asp:Label>&nbsp;
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:Calendar ID="cal_SonTarih" runat="server" BackColor="White" BorderColor="#999999"
                CellPadding="4" DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt"
                ForeColor="Black" Height="180px" OnSelectionChanged="bt_Tamam2_Click" Width="200px">
                <SelectedDayStyle BackColor="#666666" Font-Bold="True" ForeColor="White" />
                <TodayDayStyle BackColor="#CCCCCC" ForeColor="Black" />
                <SelectorStyle BackColor="#CCCCCC" />
                <WeekendDayStyle BackColor="#FFFFCC" />
                <OtherMonthDayStyle ForeColor="#808080" />
                <NextPrevStyle VerticalAlign="Bottom" />
                <DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" />
                <TitleStyle BackColor="#999999" BorderColor="Black" Font-Bold="True" />
            </asp:Calendar>
            <asp:Label ID="lb_TarihUyari" runat="server" Width="153px"></asp:Label>
        </ContentTemplate>
    </asp:UpdatePanel>
    <br />
    <asp:FileUpload ID="myFileUpload" runat="server" /><asp:Button ID="Button2" runat="server"
        OnClick="Button1_Click" Text="Yukle" /><asp:Label ID="lb_Resim" runat="server" Visible="False"></asp:Label><asp:Label
            ID="lb_Resim2" runat="server"></asp:Label><br />
    <asp:Button ID="bt_Guncelle" runat="server" OnClick="bt_Guncelle_Click" Text="Guncelle" />
    <asp:Button ID="bt_Iptal" runat="server" Text="Iptal" OnClick="bt_Iptal_Click" />
    <asp:Label ID="lb_Guncelle" runat="server"></asp:Label><br />
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:shoppingConnectionString %>"
        SelectCommand="SELECT productimage.productimage, users.user_name, products.name, products.description, products.price, products.productdate, products.deadline FROM products INNER JOIN productimage ON products.imageid = productimage.productimageid INNER JOIN users ON products.userid = users.enduserid WHERE (products.productid = @a)" UpdateCommand="UPDATE products SET name = @name, description = @description, price = @price, available = 1 WHERE (products.productid = @a)" >
        <SelectParameters>
            <asp:SessionParameter Name="a" SessionField="idproduct" />
        </SelectParameters>
        <UpdateParameters>
            <asp:Parameter Name="name" />
            <asp:Parameter Name="description" />
            <asp:Parameter Name="price" />
        
                        <asp:SessionParameter Name="a" SessionField="idproduct" />

        </UpdateParameters>
       

    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server"></asp:SqlDataSource>
</asp:Content>